<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div th:block th:include="~{common/top}"></div>
<div id="BackLink">
    <a href="productForm?productId=${session.product.productId}">
<!-- TODO:       Return to ${session.product.productId}-->
    </a>
</div>

<div id="Catalog">

    <table>
        <tr>
            <td>${session.product.description}</td>
        </tr>
        <tr>
            <td><b> ${session.item.itemId} </b></td>
        </tr>
        <tr>
            <td><b><font size="4">
                ${session.item.attribute1}
                ${session.item.attribute2} ${session.item.attribute3}
                ${session.item.attribute4} ${session.item.attribute5}
                ${session.product.name}
            </font></b></td>
        </tr>
        <tr>
            <td>${session.product.name}</td>
        </tr>
        <tr>
            <td>
                <div th:if="${session.item.quantity <= 0}">
                    Back ordered.
                </div>
                <div th:if="${session.item.quantity > 0}">
                    ${session.item.quantity} in stock.
                </div>
            </td>
        </tr>
        <tr>
            <td><fmt:formatNumber value="${session.item.listPrice}" pattern="$#,##0.00" /></td>
        </tr>

        <tr>
            <td>
                <a href="addItemToCart?workingItemId=${session.item.itemId}" class="Button">Add to Cart</a>
            </td>
        </tr>
    </table>

</div>

<div th:block th:include="~{common/bottom}"></div>

</body>
</html>